<?php

namespace App\Enum;


class DriverEnum
{

    /**
     * 状态
     */

    const ORDERSOURCE = 1;  //订单来源

    public static $source=[
        self::ORDERSOURCE => '小程序',
    ];

    const  PROGRESS= 1; //预约中
    const  RECEIVEDORDER =2;//已接单
    const  SERVICE =3; //正在服务
    const  UNPAID   =4; //未支付
    const  PAID =5;//已支付
    const  EVALUATED =6; //已评价
    const  PASSENGERCANCELLATION   =-1; //乘客取消
    const  DRIVERCANCELLATION =-2; //司机取消
    const  BACKGROUNDCANCEL   =-3; //后台取消


    public static $order=[
        self::PROGRESS => '预约中',
        self::RECEIVEDORDER => '已接单',
        self::SERVICE => '正在服务',
        self::UNPAID => '未支付',
        self::PAID => '已支付',
        self::EVALUATED => '已评价',
        self::PASSENGERCANCELLATION => '乘客取消',
        self::DRIVERCANCELLATION => '司机取消',
        self::BACKGROUNDCANCEL => '后台取消',
    ];

   const   REVIEWED =1;    // 待审核
   const   SUCCESS  = 2;    //成功
   const   AREJECT =  3;    //驳回
   const   PAYMENT =4;      //打款

    public static $withdraw =[
        self::REVIEWED => '待审核',
        self::SUCCESS => '成功',
        self::AREJECT => '驳回',
        self::PAYMENT => '打款',
    ];


    const WAITCONFIRM = 1; // 待审核
    const JOB = 2; // 在职
    const REJECT = 3; // 驳回
    const FREEZE = 4; // 冻结
    const DIMISSION = 5; // 离职
    const NOT_APPLY = -1; // 未申请


    public static $statusMessage = [
        self::WAITCONFIRM => '待审核',
        self::JOB => '在职',
        self::DIMISSION => '离职',
        self::FREEZE => '冻结',
        self::REJECT => '驳回',
        self::NOT_APPLY => '未申请'
    ];


    const ALIPAY = '1'; // 支付宝
    const WECHAT = '2'; //  微信
    const BANK = '3'; // 银行卡

    public static $payMessage = [
        self::ALIPAY => '支付宝',
        self::WECHAT => '微信',
        self::BANK => '银行卡'
    ];


    public static function statusMessage($code)
    {
        return self::$statusMessage[$code];
    }

    public static function payMessage($type)
    {
        return self::$payMessage[$type];
    }

    public static function withdraw($status)
    {
        return self::$withdraw[$status];
    }

    public static function order($status)
    {
        return self::$order[$status];
    }
    public static function source($source)
    {
        return self::$source[$source];
    }

}
